<template>
  <div class="good-list-item" @click="$router.push('/goodgetail?id='+data.id)">
    <img
      v-if="data.isLatest === 1"
      class="sanjiao"
      src="../../assets/images/home/new-j.png"
      alt=""
    />
    <img
      v-if="data.isHotSale === 1"
      class="sanjiao"
      src="../../assets/images/home/hot-j.png"
      alt=""
    />
    <img :src="'http://sc.wolfcode.cn' + `${data.coverImg}`" alt="" />
    <div class="name">{{ data.name }}</div>
    <div class="coin">
      {{ data.coin }} <img src="../../assets/images/home/monad.png" alt="" />
    </div>
    <div class="btn">立即兑换</div>
  </div>
</template>

<script>
export default {
  props: ["data"],
  data() {
    return {};
  },
};
</script>

.<style lang="less" scoped>
.good-list-item {
  position: relative;
  width: 285px;
  text-align: center;
  margin-right: 20px;
  margin-bottom: 20px;
  position: relative;
  top: 0;
  background: #fff;
  transition: top 0.5s linear;
  cursor: pointer;
  padding-bottom: 32px;
  .sanjiao {
    position: absolute;
    top: 0;
    left: 0;
  }
  img {
    margin-bottom: 22px;
  }
  .coin {
    margin-bottom: 20px;
    color: #ff5e0f;
    justify-content: center;
    display: flex;

    img {
      width: 20px;
      height: 20px;
      vertical-align: middle;
      margin-left: 10px;
    }
  }
  .btn {
    width: 100px;
    height: 36px;
    border: 1px solid #0a328e;
    line-height: 36px;
    color: #0a328e;
    margin: auto;
  }
  .name {
    font-size: 18px;
    margin-bottom: 16px;
    display: block;
  }
}
</style>